﻿using Code;
using Native.Sdk.Cqp;
using Native.Sdk.Cqp.EventArgs;
using System;

namespace Code.Events
{
    public class ME_TestMe : IMessageEvent
    {
        public string Message => "测测欧气";

        public void Process(CQPrivateMessageEventArgs e)
        {
            //throw new NotImplementedException();
        }

        public void Process(CQGroupMessageEventArgs e)
        {
            try
            {
                string str = "";
                var a = new Random().NextDouble();
                if (a < 0.4)
                {
                    str = "哦，倒霉蛋";
                }
                else if (a < 0.7)
                {
                    str = "一般般吧";
                }
                else if (a < 0.95)
                {
                    str = "运气不错";
                }
                else
                {
                    str = "天赐的欧皇！";
                }
                e.FromGroup.SendGroupMessage(CQApi.CQCode_At(e.FromQQ) + "\n测了测你的欧气...我想你应该..." + str);
            }
            catch (Exception)
            {
                throw;
            }
        }
    }
}